package com.android.monee.data.access.inMemory;

import java.util.Collection;

import com.android.monee.data.access.IdNClone;

public class DaoUtils {

	public static <T extends IdNClone<Integer, T>> int getNextId(Collection<T> datas){
		int maxId = 0;
		for (T obj : datas){
			if(obj.getId() > maxId)
				maxId = obj.getId();
		}
		return ++maxId;
	}
}
